package cn.aws360.boot.extend.sms.starter.config;

import cn.aws360.boot.extend.sms.api.pojo.properties.AlibabaSmsProperties;
import cn.aws360.boot.extend.sms.api.pojo.properties.TencentSmsProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author junnan
 */
@Configuration
@ComponentScan(basePackages = {"cn.aws360.boot.extend.sms.**"})
public class SmsAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(AlibabaSmsProperties.class)
    public AlibabaSmsProperties alibabaSmsProperties() {
        return new AlibabaSmsProperties();
    }

    @Bean
    @ConditionalOnMissingBean(TencentSmsProperties.class)
    public TencentSmsProperties tencentSmsProperties() {
        return new TencentSmsProperties();
    }

}
